1. Field of the Invention
The present invention relates to a technique of encoding a specific region of an image to image quality higher than in other regions.
2. Description of the Related Art
An image signal encoding technique is used to transfer or store/reproduce a moving image. As the moving image encoding techniques, international standard encoding methods such as International Standard 13818 (MPEG-2) are known. ISO/IEC International Standard 14496-2 (MPEG-4 Visual), ITU-T Rec. H.264 Advanced Video Coding|ISO/IEC International Standard 14496-10 (MPEG-4 AVC/H.264, to be referred to as H.264 hereinafter), and the like are also known as international standard encoding methods.
These techniques are used in the fields of video camera and recorder as well. In particular, there is recently a vigorous effort going on to apply the techniques to surveillance video cameras (to be referred to as surveillance cameras hereinafter). In application to a surveillance camera, image data is encoded at a relatively low bit rate to suppress the size of encoded data in many cases because of necessity of long-term recording. In the low bit rate encoding, however, a large amount of information is lost, and the image quality degrades. For this reason, the technique cannot function well to achieve the original object of, for example, specifying a human face.
Instead of uniformly encoding the whole scene, there is generally used a technique of detecting a region such as a human face, which is supposed to be important for the application purpose, as a specific region and other regions as nonspecific regions and encoding the specific region to higher image quality while suppressing the code amount only in the nonspecific regions.
In this technique, however, a region that should not be detected actually may erroneously be detected as a specific region because of poor camera performance or quick motion of the detection target object. To solve this problem, for example, Japanese Patent Laid-Open No. 2009-005238 discloses an image encoding method in which the adequacy of a specific region is verified based on its position or a face size, and the quantization value of the specific region is controlled. Japanese Patent Laid-Open No. 2009-005239 also discloses an image encoding method of tracking a detected specific region and correcting the specific region in a frame to be actually encoded.
However, when accurately detecting the specific region, the load of the specific region detection process is heavy. This leads to a delay of several frames in an encoding process until the specific region is detected. The related art does not particularly mention any technique of coping with the delay in specific region detection. The delayed specific region is sometimes different from the specific region in a frame to be actually encoded. Hence, the image quality cannot appropriately be improved by changing the encoding parameter for the delayed specific region. Also considerable is a method of predicting the specific region in a frame to be encoded based on the delayed specific region and changing the encoding parameter for the predicted specific region. However, a wrong region may be predicted as a specific region, and appropriate image quality improvement may be impossible.